from django.db import models

# Create your models here.
from django.db.models.fields import CharField, IntegerField, DateField
from django.db.models.fields.related import ForeignKey

class Cite( models.Model ):
    cite = CharField( null = False, max_length= 256)
    oid = IntegerField( null = True)
    rate = IntegerField( null = False, default=0)

    def __unicode__(self):
        return "%s " % self.cite

class Comment( models.Model):
    comment = CharField( null = False, max_length=512)
    cite = ForeignKey(Cite)
    
    def __unicode__(self):
        return "%s" % self.comment
